<template>
  <XtxBread>
    <XtxBreadItem to="/">首页</XtxBreadItem>
    <XtxBreadItem :to="`/category/${subCate.parentId}`">
        {{subCate.parentName}}
    </XtxBreadItem>
    <Transition name="fade-right" mode="out-in">
      <XtxBreadItem :key="subCate.name">{{subCate.name}}</XtxBreadItem>
    </Transition>
  </XtxBread>
</template>
<script>
import { inject } from 'vue'

export default {
  name: 'SubBread',
  setup () {
    const subCate = inject('subCate')
    // console.log(subCate)
    return { subCate }
  }
}
</script>

<style scoped lang="less">
</style>
